<?php

namespace App\Listeners;

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Artisan;

class InitApp implements ShouldQueue
{
    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle($event)
    {
        if (!env('APP_KEY')) {
            // 生成key
            Artisan::call("key:generate");
        }

        // 对路由进行缓存

    }
}
